<?php

require '../conn.php';

require 'config.php';

require '../inc/function.php';

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title></title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" href="../css/admin.css" type="text/css" />

<script src="inc/function.js" language="javascript"></script>

</head>

<body>

<?php

switch($id){
 
case 1:

	$title='关于我们';

	break;

case 2:

	$title='业务领域';

	break;

case 3:

	$title='产品中心';

	break;

case 4:

	$title='新闻中心';

	break;

case 5:

	$title='人力资源';

	break;
 
	
case 6:

	$title='联系我们';

	break;
 
	
case 7:

	$title='合作伙伴';

	break;
  
 
 
}

if ($act=='modify'){

	$k_name=ReStra($_POST['k_name']);

	$k_keyword=ReStra($_POST['k_keyword']);

	$k_description=ReStra($_POST['k_description']);

	mysql_query("update ".$language."_keywords set k_name='$k_name',k_keyword='$k_keyword',k_description='$k_description' where k_id=$id",$conn);

	Msg('','keywords.php?id='.$id);

}

$query=mysql_query('select * from '.$language.'_keywords where k_id='.$id,$conn);

$row=mysql_fetch_array($query);

?>

<div id="container">

  <div class="edit">

      <h1>关键字设置 - <?php echo $title ?><a href="javascript:location.reload();">刷新</a></h1>

      <form name="form1" method="post" action="?act=modify&id=<?php echo $id ?>">

        <table width="100%" border="0" cellpadding="0" cellspacing="0">

          <tr>

            <td class="edit_title">Title：</td>

            <td><input type="text" name="k_name" class="inputtext" value="<?php echo $row['k_name'] ?>" style="width:98%" maxlength="255" /></td>

          </tr>

          <tr>

            <td class="edit_title">Keyword：</td>

            <td><textarea name="k_keyword" class="inputarea"><?php echo $row['k_keyword'] ?></textarea></td>

          </tr>

          <tr>

            <td class="edit_title">Description：</td>

            <td><textarea name="k_description" class="inputarea"><?php echo $row['k_description'] ?></textarea></td>

          </tr>

          <tr>

            <td class="edit_title" height="30">&nbsp;</td>

			<td><input type="submit" name="button" class="button" value=" 修改 " /></td>

          </tr>

        </table>

    </form>

    </div>

</div>

</body>

</html>